'''
Created on Apr 5, 2016

@author: JimmyMo
'''
from reader.redisreader import RedisReader
from writter.kafkawritter import KafkaWritter
from boot.rabbitmqboot import RabbitMQBoot
from queue import Queue
import time

def start():
    queue = Queue()
    threads = []
#     now = time.clock()
    #     reader = Reader4Generator()
    reader = RedisReader(queue=queue, raw_options='')
    writter = KafkaWritter(queue=queue, raw_options='')
    threads.append(reader)
    threads.append(writter)
    reader.start()
    writter.start()
    [elem.join() for elem in threads]

if __name__ == "__main__":
    start()